package producers;
import java.util.ArrayList;
import confInfo.*;

public class ProducersTest {
	
	public static void main(String[] args) {
		
		String[] s = {"name","address"}; 
		ItemProducer ip = new ItemProducer("taobao",s);
		System.out.println(ip.produce());
		
		PipelineProducer pp = new PipelineProducer("test");
		System.out.println(pp.produce());
		
		ConfBean cb = new ConfBean();
		ItemBean ib1 = new ItemBean();
		ib1.setKey("item_name2");
		ib1.setValue("item_path2");
		cb.addItem("item", ib1);
		
		ItemBean ib2 = new ItemBean();
		ib2.setKey("item_name1");
		ib2.setValue("item_path1");
		cb.addItem("item", ib2);
		
		ItemBean ib3 = new ItemBean();
		ib3.setKey("rule1");
		ib3.setValue("level1");
		cb.addItem("rule", ib3);
		
		ItemBean ib4 = new ItemBean();
		ib4.setKey("level1_xpath");
		ib4.setValue("item");
		cb.addItem("level1", ib4);
	
		SpiderProducer sp = new SpiderProducer("taobao", cb);
		System.out.println(sp.produce());
		
		SettingProducer setting = new SettingProducer("taobao");
		System.out.println(setting.produce());
	}

}
